Detecting vehicles in images using HOG and SVM

Steps

  1. Train the classifier from the train images
    a. Load and visualize train images
    b. Select and visualize various color spaces
    c. Select and visualize required train features (HOG and color features)
    d. Train the classfier
  2. Detect vehicles on the test images
    a. Do a sliding window search with different window scales tp detect bounding boxes
    b. Merge the bounding boxes using heat maps and thresholding
    c. Display bounding boxes on the images

Step 1: Creating the model for the classifier

a. Load and visualize the training images

Helper functions to visualize and understand the training images

Load images from the disk

Images are in data folder

Visualize sample images for car and not car types

b. Select and visualize various color spaces

Plot the color spaces in 3d

c. Select and visualize required train features (HOG and color features)

d. Train the classifier on the features

Step 2: Detect vehicles on the test images

Load the test images

Steps for running the models of the test images

a. Do a sliding window search with different window scales tp detect bounding boxes
b. Merge the bounding boxes using heat maps and thresholding
c. Display bounding boxes on the images